var key_Meitu         =0;
var data_Meitu        ={};
var data_Meitu_length =0;
var Meitu_stop        =0;
var data_Meitu_time   =0;

function clock_bg_play(){
    console.log("存在"+data_Meitu_time)
    document.getElementById("Meitu_bg_img").src=data_Meitu[key_Meitu++];
    if (key_Meitu==data_Meitu_length){key_Meitu=0;}
}

function clock_Fullscreen_play(){
    console.log("存在"+data_Meitu_time)
    document.getElementById("Meitu_Fullscreen_img").src=data_Meitu[key_Meitu++];
    if (key_Meitu==data_Meitu_length){key_Meitu=0;}
}

//暂停一张美图-通用
function set_Meitu_suspend() {
    if (Meitu_stop !=0){self.clearInterval(Meitu_stop); }
}
//播放背景美图
function set_Meitu_bg_play(data = {}) {
    console.log(data)
    console.log("背景美图")
    key_Meitu         =0;
    data_Meitu        =data["data"];
    data_Meitu_length =data["len"];
    data_Meitu_time   =data["time"]*1000;

    set_Meitu_exit();
    document.getElementById("Meitu_bg_img").style.background="#000";
    document.getElementById("Meitu_bg_img").style.display="block";
    clock_bg_play();
    Meitu_stop =self.setInterval("clock_bg_play()",data_Meitu_time);
}


//播放全屏美图
function set_Meitu_Fullscreen_play(data = {}) {
    console.log(data)
    console.log("全屏美图")
    key_Meitu         =0;
    data_Meitu        =data["data"];
    data_Meitu_length =data["len"];
    data_Meitu_time   =data["time"]*1000;

    set_Meitu_exit();
    document.getElementById("Meitu_Fullscreen_img").style.background="#000";
    document.getElementById("Meitu_Fullscreen_img").style.display="block";
    clock_Fullscreen_play();
    Meitu_stop =self.setInterval("clock_Fullscreen_play()",data_Meitu_time);
}


//退出-通用
function set_Meitu_exit() {
    if (Meitu_stop !=0){self.clearInterval(Meitu_stop); }
    document.getElementById("Meitu_Fullscreen_img").style.display="none";
    document.getElementById("Meitu_bg_img").style.display="none";
}